#ifndef LOG_MANAGER_H
#define LOG_MANAGER_H

#include <QtCore/QObject>
#include "log_global.h"

namespace smslog {

class LogManagerPrivate;

class LOGMANAGER_EXPORT LogManager : public QObject {
  Q_OBJECT
public:
  LogManager(const QString &file_path,
             const QString &file_prefix,
             int buffer_size = 1024, //1024b
             int queue_size = 10000,
             int write_time = 20); //msec

  ~LogManager();

  void debug(int app,
             int cls,
             int obj,
             const QByteArray &msg);

  void info(int app,
            int cls,
            int obj,
            const QByteArray &msg);

  void warning(int app,
               int cls,
               int obj,
               const QByteArray &msg);

  void error(int app,
             int cls,
             int obj,
             const QByteArray &msg);

  void fatal(int app,
             int cls,
             int obj,
             const QByteArray &msg);

private:

  LogManagerPrivate *p;

};

} // namespace smslog

#endif // LOG_MANAGER_H
